// Author: Domien Nowicki


#ifndef CELL_H
#define CELL_H

#include "Texture.h"


class Cell
{
	public:
		enum Side
		{
			FRONT,
			RIGHT,
			BACK,
			LEFT,
			CEILING,
			FLOOR,
			SIDECOUNT,
		};

		Cell(unsigned int mapX, unsigned int mapY);
		Cell(const Cell& rhs);
		virtual ~Cell();


		unsigned int GetMapX() const;
		unsigned int GetMapY() const;


		virtual void SetWall();
		virtual void SetEmpty();
		bool IsEmpty() const;

		virtual void SetTexture(Cell::Side side, unsigned int tindex, const Pixel& userColor);
		unsigned int GetTexture(Cell::Side side) const;

		const Pixel& GetUserColor(Cell::Side side);

	protected:
		virtual void SetMapPos(unsigned int nMapX, unsigned int nMapY);


	private:
		void Clear();


		bool empty;
		unsigned int mapX, mapY;
		unsigned int textures[SIDECOUNT];
		Pixel userColors[SIDECOUNT];
};

#endif // CELL_H
